package com.nbsaas.sample.topic.rest.convert;

import com.nbsaas.sample.entity.topic.Topic;
import com.nbsaas.sample.topic.api.domain.response.TopicResponse;

import com.nbsaas.boot.utils.BeanDataUtils;
import com.nbsaas.boot.rest.api.Converter;

/**
* 实体对象转化成响应对象
*/

public class TopicResponseConvert  implements Converter<TopicResponse,Topic> {

    @Override
    public TopicResponse convert(Topic source) {
        TopicResponse  result = new  TopicResponse();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }

}

